# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>

pkgname=perl-unicode-stringprep
pkgver=1.105
pkgrel=8
pkgdesc="Preparation of Internationalized Strings (RFC 3454)"
arch=('any')
url="https://search.cpan.org/dist/Unicode-Stringprep/"
license=('GPL' 'PerlArtistic')
depends=('perl')
makedepends=('perl-module-build>=0.42')
checkdepends=('perl-test-nowarnings')
provides=("perl-unicode-stringprep-bidi=$pkgver" "perl-unicode-stringprep-mapping=$pkgver"
	  "perl-unicode-stringprep-prohibited=$pkgver" "perl-unicode-stringprep-unassigned=$pkgver")
options=(!emptydirs)
source=("https://search.cpan.org/CPAN/authors/id/C/CF/CFAERBER/Unicode-Stringprep-$pkgver.tar.gz")
md5sums=('bf9ffbc387cc12d67a3875be1cd8e105')
_ddir="Unicode-Stringprep-$pkgver"

build()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null
  unset PERL5LIB PERL_MB_OPT
  /usr/bin/perl Build.PL
  ./Build
)

check()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null
  unset PERL5LIB PERL_MB_OPT
  ./Build test
)

package()
(
  cd "$srcdir/$_ddir"
  export PERL_MM_USE_DEFAULT=1 MODULEBUILDRC=/dev/null
  unset PERL5LIB PERL_MB_OPT
  ./Build install installdirs=vendor destdir="$pkgdir"
  find "$pkgdir" -name .packlist -o -name perllocal.pod -delete
)
